<table class="table table-bordered text-center">
    <thead>
    </thead>
    <tbody>
        <tr>
            <td>订单编号</td>
            <td>称呼</td>
            <td>手机号码</td>
            <td>门店名称</td>
            <td>总金额</td>
            <td>订单类型</td>
            <td>订单状态</td>
            <td>支付状态</td>
            <td>下单日期</td>
        </tr>
        {foreach name="orderList" item="item"}
        <tr>
            <td>{$item.order_sn}</td>
            <td>{$item.consignee}</td>
            <td>{$item.mobile}</td>
            <td>{$item.store_name}</td>
            <td>{$item.total_amount}</td>
            <td>
                {if condition="$item.order_mode eq 1"}
                租借
                {else/}
                购买
                {/if}
            </td>
            <td>
                {if condition="$item.order_status lt 0"}
                {switch $item.order_status }
                {case value="-1" break="1"}已取消{/case}
                {/switch}
                {else/}
                {if condition="$item.order_mode eq 1"}
                {if condition="$item.order_status eq 4 and $item.end_time lt time()"}
                已超时
                {else/}
                {$order_status[$item.order_status]}
                {/if}
                {else/}
                {$order_status[$item.order_status]}
                {/if}
                {/if}
            </td>
            <td>{$pay_status[$item.pay_status]}</td>
            <td>{$item['add_time']|date="Y-m-d H:i",###}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
<div class="row page">
    <div class="col-sm-12 text-center">
        {$page}
    </div>
</div><div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
                审核归还
            </h4>
        </div>
        <div class="modal-body">
            <div class="form-horizontal">
                <div class="form-group">
                    <label class="col-sm-3 control-label">
                        备注：
                    </label>
                    <div class="col-sm-8">
                        <textarea id="return_remark" name="return_remark" rows="3"></textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <input type="hidden" id="current_order_id" value="0">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭
            </button>
            <button type="button" data-state="1" class="btn btn-primary audit_returns">
                通过
            </button>
            <button type="button" data-state="0" class="btn btn-primary audit_returns">
                驳回
            </button>
        </div>
    </div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
<script>
    $('.page a').click(function () {
        var p = $(this).data('p');
        if (!p) {
            return;
        }
        ajax_index(p);
    })
    $('.open_audit').click(function () {
        var id = $(this).attr('data-id');
        $('#current_order_id').val(id);
        // 显示模态框
        $('#myModal').modal('show');
    });
    $('.goods-image').mouseover(function () {
        $(this).next().show();
    }).mouseout(function () {
        $(this).next().hide();
    });
</script>